<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS_常用值</title>
    <style>
        h1 {
            color: red;
            color: rgb(255,0,0);
            color: rgb(0,255,255);
            color: rgb(0,255,0);
            color: rgb(255,0,255);
            color: rgb(0,0,255);
            color: rgb(255,255,0);
            color: #FFFFFF;
            color: #000000;
            color: #000;

        /*    带不透明度颜色 1完全不透明 0完全透明 0.x半透明*/
            color: rgba(255,0,0,0);
            color: rgba(255,0,0,0.8);
            color: rgba(255,0,0,0.5);
            color: rgba(255,0,0,0.3);
            color: rgba(255,0,0,0.2);
            color: rgba(255,0,0,1);
        }
        /*块级元素的默认宽度为父级宽度的100%，高度为0，需要靠内容撑起来*/
        .d1 {
            /*注意：插入的背景图片必须设置所在区域的大小！*/
            width: 100px;
            height: 100px;
            background-image: url("img/mr.png");
        /*    调整背景图大小宽度高度*/
            background-size: 50px 100px;
            background-color: green;
        }
        .d2 {
            width: 500px;
            height: 300px;
            background-image: url("img/mr.png");
            border: red 5px solid;
            /*设置背景图不允许重复*/
            background-repeat:no-repeat;
            /*background-position: 0 0;*/
            /*background-position: -50px 0;*/
            /*background-position: 0 50px;*/
            background-position: -50px -50px;
            /*background-position: center center;*/
            /*background-position: 50% 50%;!*中间*!*/
        }
        .d3 {
            width: 500px;
            height: 300px;
            /*线性渐变 角度值 颜色1 颜色2 ...*/
            background-image: linear-gradient(270deg,red,orange,green);/*线性渐变*/
        }
    </style>
</head>
<body>
<h1>测试颜色</h1>
<!--.d*3 Tab补全-->
<div class="d1"></div>
<div class="d2"></div>
<div class="d3"></div>
<h1>测试颜色2</h1>
</body>
</html>